package com.lmx.repoDomain.repository;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.lmx.persistence.service.CommonService;
import com.lmx.repoDomain.tmodel.BedWorkTimeSetting;

import io.katharsis.repository.annotations.JsonApiResourceRepository;

@JsonApiResourceRepository(BedWorkTimeSetting.class)
@Component
public class BedWorkTimeSettingRepository extends BaseRepository<BedWorkTimeSetting> {

	@Autowired
	private CommonService commonService;

	@PostConstruct
	public void init() {
		dslJpaService.setEntityClass(BedWorkTimeSetting.class);
	}
 
//	@Override
//	@JsonApiSave
//	public BedWorkTimeSetting save(BedWorkTimeSetting bed) {
//		Dicttype bedIdle = commonService.getDicttype(CommonConstants.DICTTYPE.BED_STATUS_1.label());
//		if (bed.getId() == null) {
//			bed.setStatus(bedIdle);
//			dslJpaService.create(bed);
//		} else {
//			if (bed.getDelStatus() == 1) {// 删除
//				bed.setStatus(bedIdle);
//			} else {
//
//			}
//			dslJpaService.update(bed);
//		}
//		return bed;
//	}
}
